function x = num2str_math(x, f)

x = num2str(x,f);
if strmatch('-',x(1))
   x = ['$-$' x(2:end)]; 
end

return